package com.wavehi.request_mapping.web.controller;

import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author WaveHi
 * @Date 4/11/2021 下午 4:58
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description
 */
@Controller
public class CommonController {

    @RequestMapping("/forward")
    public String forward(HttpServletRequest request) {
        request.setAttribute("username", "Tom");
        request.setAttribute("age", "12");
        request.setAttribute("password", "qwerty");
        return "forward:/requestAttribute";
    }
}
